export interface SpuSaleAttrValueItem {
  baseSaleAttrId?: number;
  id?: number;
  saleAttrName?: string;
  spuId?: number;
  isChecked?: string;
  saleAttrValueName: string;
}

export type spuSaleAttrValueListModel = SpuSaleAttrValueItem[];

export interface SpuSaleAttrItem {
  baseSaleAttrId?: number;
  id?: number;
  spuId?: number;
  isEdit?: boolean;
  // 为了table有key
  index?: number;
  saleAttrName: string;
  spuSaleAttrValueList: spuSaleAttrValueListModel;
}

export type spuSaleAttrListModel = SpuSaleAttrItem[];

export interface SpuImageItem {
  uid?: number;
  id?: number;
  spuId?: number;
  imgName: string;
  imgUrl: string;
}

export type spuImageListModel = SpuImageItem[];

export interface SpuItem {
  id?: number;
  category3Id?: number;
  spuName: string;
  description: string;
  tmId: undefined | number;
  spuSaleAttrList: spuSaleAttrListModel;
  spuImageList: spuImageListModel;
}

export type spuListModel = SpuItem[];
/**
 * @description: Get spuList return value
 */
export interface GetSpuListResultModel {
  current: number;
  pages: number;
  records: spuListModel;
  searchCount: boolean;
  size: number;
  total: number;
}

export interface BaseSaleAttrItem {
  id: number;
  name: string;
}

export type baseSaleAttrListModel = BaseSaleAttrItem[];

export interface GetSpuListParams {
  page: number;
  limit: number;
  category3Id: number;
}
